window.addEventListener("load", function () {
  var td = document.querySelector(".td");
  var biaoti = td.querySelector(".biaoti");
  var as = biaoti.querySelectorAll("a");
  var content = td.querySelectorAll(".content");
  for (i = 0; i < as.length; i++) {
    as[i].setAttribute("index", i);
    as[i].onclick = function () {
      for (i = 0; i < as.length; i++) {
        as[i].style.backgroundColor = "";
      }
      this.style.backgroundColor = " ";
      var index = this.getAttribute("index");
      for (j = 0; j < content.length; j++) {
        content[j].style.display = "none";
      }
      content[index].style.display = "block";
    };
  }
  var firstul = document.querySelector(".firstul");
  var uls = firstul.querySelectorAll(".ul");
  var i = firstul.querySelector(".i");
  $(".skill_baner .search .top input").click(function () {
    $(this).val("");
  });
  $(".skill_baner .search .top input").blur(function () {
    if ($(this).val().length === 0) {
      $(this).val("输入英雄装备或简称");
    } else {
      $(this).val($(this).val());
    }
  });
});
